using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

/**
*@file       PosSyncTransferSender.cs
*@brief      send message PosSyncTransfer
*
*@author     graywind
*@version    1.0.0.1
*@data       2012/3/22
*/

//send message PosSyncTransfer
public class msgPosSyncTransfer
{
    public const int MessageId = (int)NetMessageTypes.MessageType.PosSyncTransfer;
    //TODO
    public int SessionId = NetLib.INVALID_SESSION;
    public possynctransfer.PosSyncTrasfer MainMsg = new possynctransfer.PosSyncTrasfer();
	/// <summary>
	/// Initializes a new instance of the <see cref="msgGameSyncTransfer"/> class.
	/// </summary>
	/// <param name='session_id'>
	/// Session_id.
	/// </param>
	/// <param name='gate_code'>
	/// Gate_code.
	/// </param>
	/// <param name='buffer'>
	/// Buffer.
	/// </param>
    public msgPosSyncTransfer(int session_id, int gate_code, byte[] buffer)
	{
		SessionId = session_id;
		MainMsg.GateCode = gate_code;
		MainMsg.Buffer = buffer;
	}
}

//handle message
public partial class gwMessagePort
{
    /// <summary>
    /// handle message
    /// </summary>
    /// <param name="msg">message wrapper of PosSyncTransfer</param>
    public static void ProcessMessage(msgPosSyncTransfer msg)
    {
        //TODO
        ProtoNet<possynctransfer.PosSyncTrasfer>.Send(msg.SessionId, (uint)msgPosSyncTransfer.MessageId, msg.MainMsg);
    }
}
